package com.thenie.dao.impl;

import com.thenie.dao.OrderItemDao;
import com.thenie.pojo.OrderItem;

public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {
    @Override
    public int createOrderItem(OrderItem orderItem) {
        String sql="INSERT INTO t_order_item(`id`,`item_id`,`name`,`count`,`price`,`total_price`,`order_id`)VALUES(?,?,?,?,?,?,?)";
        return update(sql, orderItem.getId(),orderItem.getItemId(),orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}
